
#docker rmi -f portainer/agent:alpine
docker pull portainer/agent:alpine
rm -rf /cardone/docker/images/portainer/agent.alpine.tar
mkdir -p /cardone/docker/images/portainer
docker save portainer/agent:alpine > /cardone/docker/images/portainer/agent.alpine.tar
#docker load < /cardone/docker/images/portainer/agent.alpine.tar

# docker tag portainer/agent:alpine cardone:5000/portainer/agent:alpine
# docker push cardone:5000/portainer/agent:alpine



#docker rmi -f portainer/portainer:alpine
docker pull portainer/portainer:alpine
rm -rf /cardone/docker/images/portainer/portainer.alpine.tar
mkdir -p /cardone/docker/images/portainer
docker save portainer/portainer:alpine > /cardone/docker/images/portainer/portainer.alpine.tar
#docker load < /cardone/docker/images/portainer/portainer.alpine.tar

# docker tag portainer/portainer:alpine cardone:5000/portainer/portainer:alpine
# docker push cardone:5000/portainer/portainer:alpine



docker stack rm cardone-portainer

docker stack deploy -c /cardone/middlewares/portainer/prod.yml cardone-portainer

for i in {1..10}  
do  
sleep $i

docker stack ps cardone-portainer

docker service ls
done

docker service logs cardone-portainer_portainer -f --tail 300
